<template>
    mv视频
    <button @click="datas">点击实现子组件传递数据到父组件</button>
</template>

<script>
// 调用方法获取数据
import { getAllMv } from '@/api/self.js'
import { onMounted } from 'vue';

// const res = getAllMv()
// console.log(res)
export default {
    setup() {
        onMounted(async () => {
            const res = await getAllMv()
            console.log(res)
        });
      
    },
    data() {
        return {
            value: '我是子组件'
        }
           
    },
    methods: {
        datas() {
            this.$emit('info', this.value)
            console.log(this.value)
        }
    }
}
</script>